<template>
  <div class="mine">
    <div class="block">
      <img :src="pic" alt="">
       <button>已登录</button>
       <div class="eat">吃货卡<br>
        <span>升级超级吃货卡，每月得无门槛红包</span>
       </div>
      <div class="title">常用工具</div>
      <div class="list">
        <div class="btn" @click="toAddress">
          <van-icon name="location-o" size="24" />
          <span>我的地址</span>
        </div>
        <div class="btn">
          <van-icon name="phone-circle-o"  size="24"/>
          <span>我的客服</span>
        </div>
        <div class="btn" @click="toCollect"> 
          <van-icon name="like-o"  size="24"/>
          <span>店铺关注</span>
        </div>
        <div class="btn">
          <van-icon name="star-o"  size="24"/>
          <span>评价有礼</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
let pic ='https://img2.baidu.com/it/u=2833484760,1116678162&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1667062800&t=02e4a01544c80220236db1963553108b'
export default {
  data(){
    return{
      pic
    }
  },
  methods:{
    toAddress(){
      this.$router.push('/address')
    },
    toCollect(){
      this.$router.push('/collect');
    }
  }
}
</script>

<style lang='scss' scoped>
.mine{
  background-color: #f5f5f5;
}
.block{
  position: relative;
  margin: 2vw;
  background-color: white;
  img{
    width: 14vw;
    height: 14vw;
    border-radius: 50% 50%;
  }
  button{
    position: absolute;
    top: 4vw;
    left: 18vw;
    outline: none;
    border: 1px solid gray;
    background: white;
    border-radius: 2vw;
  }
  .eat{
    width: 90vw;
    height: 20vw;
    padding-left: 4vw;
    margin: 4vw 0;
    background: aqua;
    border-radius: 4vw;
    color: white;
    font-size: 6vw;
    span{
      // color: black;
      font-size: 4vw;
    }
  }
  .title{
    font-weight: bold;
    padding-left: 2vw;
  }
  .list{
    display: flex;
    justify-content: space-around;
    align-content: center;
    .btn{
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 4vw 0;
      i{
        margin-bottom: 2vw;
      }
    }
  }
}
</style>